<%--
 *  File:    DealerSFEData.jsp
 *  @Author: TerryCui 
 *  Date:    2011/1/12
 *
 *  Copyright (C) 2000 - 2010 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ page language="java"%>
<%@ page import="java.util.*"%>
<%@ page import="org.apache.log4j.Category"%>

<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval"%>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom"%>
<%
  //init param
  String strModuleName = "SFE";
  String privilegeCode = "10901,10902,10903";
  String contextPath = request.getContextPath();
%>

<html>
<head>
<title>DealerSFEData</title>
<PageFlow:CheckPageFlow pageName="p_dealersfedata"/>
<%
	Vector sfeData = (Vector)pageContext.getAttribute("sfedata");
	if(sfeData == null){
		sfeData = new Vector();
	}
%>
<%@include file="/inc/PageDefault.inc"%>
<%@include file="/inc/FrmDefault.inc"%>
<link rel="stylesheet" href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css" type="text/css">
</head>

<body style="overflow: auto;">
<form name="cform" id="cform" method="post"	action="<%=contextPath%>/Dispatcher">
<table width="100%" cellspacing="0" border="0" cellpadding="0">
	<tr>
		<td>
			<table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
				<tr class="deepblue-left">
					<td class="title_center"><%= label.getLabelName("L_VisitActualDate")%></td>
					<td class="title_center"><%= label.getLabelName("L_SalesRep")%></td>
					<td class="title_center"><%= label.getLabelName("L_VisitProcess")%></td>
					<td class="title_center"><%= label.getLabelName("L_HasAssist")%></td>
					<td class="title_center"><%= label.getLabelName("L_Assisted")%></td>
				</tr>
				<%
					int i = 0;
					String strClassType = new String();
					String strHasAssist = label.getLabelName("L_No");
					String strAssisted = label.getLabelName("L_No");
				%>
				<logic:iterate id="onerow" collection="<%= sfeData %>" >          
					<%
						HashMap onData = (HashMap)pageContext.getAttribute("onerow");
						int assistisaccept = 2;
						if(onData.get("assistisaccept") != null){
							assistisaccept = ((Integer)onData.get("assistisaccept")).intValue();
						}
						if(assistisaccept == 1)
							strHasAssist = label.getLabelName("L_Yes");
						
						if(onData.get("mainvisitplandetailid") != null)
							strAssisted = label.getLabelName("L_Yes");
							
						if(i%2 == 1){
							strClassType = "td-listrom";
						}else{
							strClassType = "";
						}
						i++;
					%>      
					<tr onMouseOver="this.className='tr-over'" onMouseOut="this.className='<%=JspHelper.filterNull( strClassType )%>'"  class="none">
						<td class="title_center"><custom:write name="onerow" property="feedbackdate"  nbsp="true"/></td>
						<td class="title_center"><custom:write name="onerow" property="employeename" nbsp="true"/></td>
						<td class="title_center"><custom:write name="onerow" property="processname"  nbsp="true"/></td>
						<td class="title_center"><%=JspHelper.filterNull( strHasAssist )%></td>
						<td class="title_center"><%=JspHelper.filterNull( strAssisted )%></td>
					</tr>
				</logic:iterate>
			</table>
		</td>
	</tr>
</table>
</form>
</body>
</html>